import { Define, EntityObjectFactory } from 'tiny-entity2';
import { Component } from './componet';
import { Condition } from './condition';
const EntityObjectType = EntityObjectFactory.GetEntityObjectType(process.env.dataBaseType || 'mysql');
@Define.Table({ TableName: "tmpcomitem" })
export class TmpComItem extends EntityObjectType<TmpComItem>{
    @Define.PrimaryKey()
    id: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR,
        IsIndex: true
    })
    templateId: string;

    @Define.Column({
        DataType: Define.DataType.INT,
        DefaultValue: 0
    })
    index: number;

    @Define.Column({
        DataType: Define.DataType.VARCHAR,
        IsIndex: true
    })
    componentId: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR,
        NotAllowNULL: true,
        IsIndex: true
    })
    orgId: string;

    @Define.Column({
        DataType: Define.DataType.JSON,
    })
    component: Component;

    condition: Condition;
}